// 导入封装好的axios
import $axios from "./axios"
import $mockAxios from "./MockAxios"

/**
 * 封装请求三级菜单的axios方法
 * @params  空
 * @returns Promise
 */
export const ReqGetBaseCategoryList = () => $axios.get("/api/product/getBaseCategoryList")

export const ReqGetSliceList = () => $mockAxios.get("/slice")

export const ReqGetFloorList = () => $mockAxios.get("/floor")

export const ReqGetGoodsList = (params) => $axios.post("/api/list",params)

export const ReqGetGoodsDetail = (id) => $axios.get(`/api/item/${id}`)

export const ReqGetAddCard = (skuId,skuNum) => $axios.post(`/api/cart/addToCart/${skuId}/${skuNum}`)

export const ReqGetCartList = () => $axios.get(`/api/cart/cartList`)

export const ReqGetCheckCart = (skuID,isChecked) => $axios.get(`/api/cart/checkCart/${skuID}/${isChecked}`)

export const ReqGetBatchCheckCart = (skuIdList,isChecked) => $axios.post(`/api/cart/batchCheckCart/${isChecked}`,skuIdList)


export const ReqGetDeleteCart = (skuId) => $axios.delete(`/api/cart/deleteCart/${skuId}`)


export const ReqGetSkuIdList = (skuIdList) => $axios.post(`/api/cart/batchDeleteCart`,skuIdList)


export const ReqGetPassport = (phone) => $axios.get(`/api/user/passport/sendCode/${phone}`)













